<div nz-form-item nz-row style="margin-top:15px;margin-bottom:10px;">
  <div nz-col [nzSpan]="6">
    <button nz-button [nzType]="'primary'" [nzSize]="'small'" col-offset-2 (click)="toBack()">
      <i class="anticon anticon-left"></i>
      <span>返回</span>
    </button>
  </div>
</div>
<nz-spin style="margin: 10px;padding:10px;background-color:#fff;" [nzSpinning]="isSpinning">
  <form nz-form>

    <div nz-form-item nz-row>
      <div nz-form-label nz-col [nzSm]="4" [nzXs]="4">
        <label *ngIf="elevatorType==3||elevatorType==1||elevatorType==5||elevatorType==2" for="businessScope">手动紧急操作装置</label>
        <label *ngIf="elevatorType==4||elevatorType==6" for="businessScope">主驱动链</label>
      </div>
      <div nz-form-label nz-col [nzSm]="1" [nzXs]="1">
        <p for="businessScope">{{selfCheckBean.pic1.isOk==true?"正常":"异常"}}</p>
      </div>
      <div nz-form-label nz-col [nzSm]="2" [nzXs]="2">
        <label for="businessScope">备注</label>
      </div>
      <div nz-form-control nz-col [nzSm]="5" [nzXs]="5" nzHasFeedback>
        <nz-input [nzDisabled]="isDisable" name="pic1" [nzId]="'pic1'" [nzSize]="'large'" [(ngModel)]="selfCheckBean.pic1.remark"
          name="pic1" [nzType]="'textarea'" [nzRows]="'2'"></nz-input>
      </div>
      <div nz-form-label nz-col [nzSm]="2" [nzXs]="2">
        <label for="businessScope">照片</label>
      </div>
      <div nz-form-control nz-col [nzSm]="7" [nzXs]="7" nzHasFeedback>
        <div *ngIf="selfCheckBean.pic1">
          <img (click)="showLargeImage(titlepic,contentpic,footerpic,pic)" style="margin-left:2px;" *ngFor="let pic of selfCheckBean.pic1.picUrl "
            src="{{config.IP+config.API.getUpload+pic}}" width="40px" height="30px" />
        </div>
      </div>

    </div>

    <div nz-form-item nz-row>
      <div nz-form-label nz-col [nzSm]="4" [nzXs]="4">
        <label *ngIf="elevatorType==3||elevatorType==1||elevatorType==5||elevatorType==2" for="businessScope">轿顶检修开关、停止装置</label>
        <label *ngIf="elevatorType==4||elevatorType==6" for="businessScope">梯级或者踏板下陷开关</label>
      </div>
      <div nz-form-label nz-col [nzSm]="1" [nzXs]="1">
        <p for="businessScope">{{selfCheckBean.pic2.isOk==true?"正常":"异常"}}</p>
      </div>
      <div nz-form-label nz-col [nzSm]="2" [nzXs]="2">
        <label for="businessScope">备注</label>
      </div>
      <div nz-form-control nz-col [nzSm]="5" [nzXs]="5" nzHasFeedback>
        <nz-input [nzDisabled]="isDisable" name="pic2" [nzId]="'pic2'" [nzSize]="'large'" [(ngModel)]="selfCheckBean.pic2.remark"
          name="pic2" [nzType]="'textarea'" [nzRows]="'2'"></nz-input>
      </div>
      <div nz-form-label nz-col [nzSm]="2" [nzXs]="2">
        <label for="businessScope">照片</label>
      </div>
      <div nz-form-control nz-col [nzSm]="7" [nzXs]="7" nzHasFeedback>
        <div *ngIf="selfCheckBean.pic2">
          <img (click)="showLargeImage(titlepic,contentpic,footerpic,pic)" style="margin-left:2px;" *ngFor="let pic of selfCheckBean.pic2.picUrl "
            src="{{config.IP+config.API.getUpload+pic}}" width="40px" height="30px" />
        </div>
      </div>
    </div>

    <div nz-form-item nz-row>
      <div nz-form-label nz-col [nzSm]="4" [nzXs]="4">
        <label *ngIf="elevatorType==3||elevatorType==1||elevatorType==5||elevatorType==2" for="businessScope">底坑停止装置</label>
        <label *ngIf="elevatorType==4||elevatorType==6" for="businessScope">紧急停止开关</label>
      </div>
      <div nz-form-label nz-col [nzSm]="1" [nzXs]="1">
        <p for="businessScope">{{selfCheckBean.pic3.isOk==true?"正常":"异常"}}</p>
      </div>
      <div nz-form-label nz-col [nzSm]="2" [nzXs]="2">
        <label for="businessScope">备注</label>
      </div>
      <div nz-form-control nz-col [nzSm]="5" [nzXs]="5" nzHasFeedback>
        <nz-input [nzDisabled]="isDisable" name="pic3" [nzId]="'pic3'" [nzSize]="'large'" [(ngModel)]="selfCheckBean.pic3.remark"
          name="pic3" [nzType]="'textarea'" [nzRows]="'2'"></nz-input>
      </div>
      <div nz-form-label nz-col [nzSm]="2" [nzXs]="2">
        <label for="businessScope">照片</label>
      </div>
      <div nz-form-control nz-col [nzSm]="7" [nzXs]="7" nzHasFeedback>
        <div *ngIf="selfCheckBean.pic3">
          <img (click)="showLargeImage(titlepic,contentpic,footerpic,pic)" style="margin-left:2px;" *ngFor="let pic of selfCheckBean.pic3.picUrl "
            src="{{config.IP+config.API.getUpload+pic}}" width="40px" height="30px" />
        </div>
      </div>
    </div>

    <div nz-form-item nz-row>
      <div nz-form-label nz-col [nzSm]="4" [nzXs]="4">
        <label for="businessScope">自检报告</label>
      </div>

      <div nz-form-control nz-col [nzSm]="20" [nzXs]="20" nzHasFeedback>

        <button nz-button style="margin-left: 20px;width: 150px" [nzType]="'primary'" [nzSize]="'small'" (click)="download(selfCheckBean.reportUrl,'年度自检报告.doc')"><span>下载</span></button>
      </div>
    </div>


    <div nz-form-item nz-row>
      <div nz-form-label nz-col [nzSm]="4" [nzXs]="4">
        <label>自检结论</label>
      </div>
      <div nz-form-control nz-col [nzSm]="7" [nzXs]="7" nzHasFeedback>
        {{selfCheckBean.isPass==1?"合格":"不合格"}}
      </div>
    </div>

    <div nz-form-item nz-row>
      <div nz-form-label nz-col [nzSm]="4" [nzXs]="4">
        <label>自检负责人签字</label>
      </div>
      <div nz-form-control nz-col [nzSm]="7" [nzXs]="7" nzHasFeedback>
        <div *ngIf="selfCheckBean.safeUserSign">
          <img style="margin-left:2px;" src="{{selfCheckBean.maintUserSign}}" width="130px" height="40px" />
        </div>
      </div>
    </div>
    <div nz-form-item nz-row>
      <div nz-form-label nz-col [nzSm]="4" [nzXs]="4">
        <label>电梯安全管理员签字</label>
      </div>
      <div nz-form-control nz-col [nzSm]="7" [nzXs]="7" nzHasFeedback>
        <div *ngIf="selfCheckBean.safeUserSign">
          <img style="margin-left:2px;" src="{{selfCheckBean.safeUserSign}}" width="130px" height="40px" />
        </div>
      </div>
    </div>

  </form>
</nz-spin>

<ng-template #titlepic>
  <span>图片</span>
</ng-template>
<ng-template #contentpic>
  <enlarge-pic [inValue]="picList" (outPut)="addOutPut($event)"></enlarge-pic>
</ng-template>
<ng-template #footerpic>
  <div>
  </div>
</ng-template>
